package com.cennavi.minenavidemo.utils;

import android.content.Context;

public class OrientationEventListener extends android.view.OrientationEventListener {
	private OrientationChangeListener orientationChangeListener;

	public interface OrientationChangeListener {
		void orientationChanged(int orientation);
	}

	public void setOrientationChangeListener(OrientationChangeListener orientationChangeListener) {
		this.orientationChangeListener = orientationChangeListener;
	}


	public OrientationEventListener(Context context) {
		super(context);
	}

	@Override
	public void onOrientationChanged(int orientation) {
		orientationChangeListener.orientationChanged(orientation);
	}
}
